<template>
  <div>
    我的
    <button @click="ret">原路返回</button>
    {{msg}}
  </div>
</template>
<script>
export default {
  name:"my",
  components: {},
  data() {
    return {
        backPath:"",
        msg:""
    };
  },
  created() {
     console.log('my')
    // this.msg = this.$route.params.msg
    //  this.msg = this.$route.query.id //
    this.msg = this.$route.params.id ||  this.$route.query.id
    // console.log(this.$route.params.id)
  },
  methods: {
    ret() {
      //  home <---> my
      // cat <---> my
      // this.$router.push(this.backPath)
      this.$router.back();
    }
  }
};
</script>
<style lang="scss" scoped>
</style>